---
title: Get build version
summary: Publishes build/version metadata for the deployed application.
status: draft
owner: Not determined from source
last_reviewed: 2026-09-17
library: PdfAPI
reference_type: embedded
operation_id: OP-GET-BUILD-VERSION
trigger: Client requests GET buildVersion
---

# OP-GET-BUILD-VERSION: Get build version

Reads build metadata for the deployed application from its physical file system root.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-GET-BUILD-VERSION |
| **Trigger** | Client requests `GET buildVersion` |
| **Entry endpoint** | [`GET buildVersion`](../endpoints/api-info-controller.md#get-buildversion) |
| **Owning component** | `ApiInfoController.GetBuildVersionData()` → `SAIF.Web.API.Core.BuildInfo.GetBuildInfo` |
| **Inputs** | None |
| **Outputs** | `IEnumerable<KeyValuePair<string,string>>` of build metadata |
| **Failure response** | No `try`/`catch` on this action — any exception produces framework exception detail (`IncludeErrorDetailPolicy.Always`) before `ApiResponseHandler` runs; the final client-visible envelope is unknown** (see [Endpoints: Error response shape](../endpoints.md#error-response-shape)) |

## Steps

1. `Server.MapPath("~")` resolves the application's physical root path.
2. `SAIF.Web.API.Core.BuildInfo.GetBuildInfo(rootPath)` reads build metadata from that path.

   `BuildInfo` is supplied by the `SAIF.Web.API.Core` NuGet package, external to this repository; its internal metadata-reading logic is not visible from here and is treated as a black-box dependency rather than inlined.
3. The resulting key/value pairs are returned bare — HTTP `200`.

## Process flow

The following diagram shows the metadata-resolution sequence for the build-version endpoint.

```mermaid
flowchart TD
    A["GET buildVersion"] --> B["Resolve physical root path"]
    B --> C["BuildInfo.GetBuildInfo reads metadata"]
    C --> D["Return key/value pairs, 200"]
```

## Transaction and side effects

| Aspect | Finding |
| --- | --- |
| Unit of work | None |
| Commit point | Not applicable — no database access |
| Records written | None |
| Downstream calls | None — reads build metadata from the deployed application's file system |
| Repeat-call behavior | Read-only; safe to repeat |

## Logging

| Surface | Written content |
| --- | --- |
| — | No dedicated logging observed on this path beyond framework-level exception logging on an uncaught failure |

## Error handling

- Any exception reading build metadata: no `try`/`catch` on this action — escapes to the framework, which produces exception detail (`IncludeErrorDetailPolicy.Always`) before `ApiResponseHandler` runs; the final client-visible envelope is unknown** (see [Endpoints: Error response shape](../endpoints.md#error-response-shape)).

## Related documentation
- [API index](../index.md)
- [Overview](../overview.md)
- [Architecture](../architecture.md)
- [Endpoints](../endpoints.md)
- [Authentication and authorization](../authentication-authorization.md)
- [Dependencies](../dependencies.md)
- [Configuration](../configuration.md)
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Data model](../data-model.md)
- [Operational runbook](../operational-runbook.md)
- [Tech debt](../tech-debt.md)

> **Note:** Statements marked with `**` could not be confirmed; treat as unknown until verified.

## Sources
- PdfAPI\Controllers\v1\ApiInfoController.cs
